﻿using System;
using System.Collections;
using Huirui.Cavan.Domain.MainBoundedContext.SystemModule;
using Huirui.Cavan.Domain.Seedwork;
using System.Collections.Generic;

namespace Huirui.Cavan.Domain.MainBoundedContext.StockModule
{
	#region StockOutApply

	/// <summary>
	/// StockOutApply object for NHibernate mapped table 'StockOutApply'.
	/// </summary>
    [Serializable]
	public class StockOutApply : Persistent<string>
	{
		#region Member Variables
		
		protected string _id;
		protected DateTime _applyDate;
		protected int _stockInOutType;
		protected string _remark;
		protected Customer _customer;
		protected Department _department;
		protected Employee _applyEmployee;
		protected Project _project;
		protected IList<StockOutApplyDetail> _stockOutApplyDetails;

		#endregion

		#region Constructors

		public StockOutApply() { }

		public StockOutApply( DateTime applyDate, int stockInOutType, string remark, DateTime createDate, DateTime modifyDate, int editUser, byte[] version, Customer customer, Department department, Employee applyEmployee, Project project )
		{
			this._applyDate = applyDate;
			this._stockInOutType = stockInOutType;
			this._remark = remark;
			this._createDate = createDate;
			this._modifyDate = modifyDate;
			this._editUser = editUser;
			this._version = version;
			this._customer = customer;
			this._department = department;
			this._applyEmployee = applyEmployee;
			this._project = project;
		}

		#endregion

		#region Public Properties


		public virtual DateTime ApplyDate
		{
			get { return _applyDate; }
			set { _applyDate = value; }
		}

		public virtual int StockInOutType
		{
			get { return _stockInOutType; }
			set { _stockInOutType = value; }
		}

		public virtual string Remark
		{
			get { return _remark; }
			set
			{
				_remark = value;
			}
		}


		public virtual Customer Customer
		{
			get { return _customer; }
			set { _customer = value; }
		}

		public virtual Department Department
		{
			get { return _department; }
			set { _department = value; }
		}

		public virtual Employee ApplyEmployee
		{
			get { return _applyEmployee; }
			set { _applyEmployee = value; }
		}

		public virtual Project Project
		{
			get { return _project; }
			set { _project = value; }
		}

		public virtual IList<StockOutApplyDetail> StockOutApplyDetails

		{
			get
			{
				if (_stockOutApplyDetails==null)
				{
					_stockOutApplyDetails = new List<StockOutApplyDetail>();
				}
				return _stockOutApplyDetails;
			}
			set { _stockOutApplyDetails = value; }
		}

		

		#endregion
	}
	#endregion
}